<template>
  <div class="right-board">
    <el-tabs v-model="state.currentTab" class="center-tabs">
      <el-tab-pane label="组件属性" name="field"/>
      <el-tab-pane label="表单属性" name="form"/>
    </el-tabs>
    <div class="field-box">

      <el-scrollbar class="right-scrollbar">
        <!-- 组件属性 -->
        <el-form size="small" label-width="90px">
          <el-form-item label="组件类型" v-if="props.activeData.changeTag">
            <el-select
                v-model="props.activeData.tagIcon"
                placeholder="请选择组件类型"
                :style="{width: '100%'}"
                @change="tagChange"
            >
              <el-option-group v-for="group in tagList" :key="group.label" :label="group.label">
                <el-option
                    v-for="item in group.options"
                    :key="item.label"
                    :label="item.label"
                    :value="item.tagIcon"
                >
                  <svg-icon class="node-icon" :icon-class="item.tagIcon"/>
                  <span> {{ item.label }}</span>
                </el-option>
              </el-option-group>
            </el-select>
          </el-form-item>
          <el-form-item label="字段名">
            <el-input v-model="props.activeData.vModel" placeholder="请输入字段名（v-model）"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.vModel!==undefined" label="默认值">
            <el-input
                v-model="props.activeData.defaultValue"
                placeholder="请输入默认值"
                @input="onDefaultValueInput"
            />
          </el-form-item>
          <el-form-item v-if="props.activeData.label!==undefined" label="标题">
            <el-input v-model="props.activeData.label" placeholder="请输入标题"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.placeholder!==undefined"  label="占位提示">
            <el-input v-model="props.activeData.placeholder" placeholder="请输入占位提示"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.startPlaceholder!==undefined" label="开始占位">
            <el-input v-model="props.activeData.startPlaceholder" placeholder="请输入占位提示"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.endPlaceholder!==undefined" label="结束占位">
            <el-input v-model="props.activeData.endPlaceholder" placeholder="请输入占位提示"/>
          </el-form-item>
<!--          <el-form-item label="表单栅格">-->
<!--            <el-slider :max="24" :min="1" :marks="{12:''}" @change="spanChange"/>-->
<!--          </el-form-item>-->
<!--          <el-form-item label="栅格间隔">-->
<!--            <el-input-number :min="0" placeholder="栅格间隔"/>-->
<!--          </el-form-item>-->
<!--          <el-form-item label="布局模式">-->
<!--            <el-radio-group>-->
<!--              <el-radio-button label="default"/>-->
<!--              <el-radio-button label="flex"/>-->
<!--            </el-radio-group>-->
<!--          </el-form-item>-->
<!--          <el-form-item label="水平排列">-->
<!--            <el-select placeholder="请选择水平排列" :style="{width: '100%'}">-->
<!--              <el-option-->
<!--                  v-for="(item, index) in state.justifyOptions"-->
<!--                  :key="index"-->
<!--                  :label="item.label"-->
<!--                  :value="item.value"-->
<!--              />-->
<!--            </el-select>-->
<!--          </el-form-item>-->
<!--          <el-form-item v-if="props.activeData.align!==undefined&&props.activeData.type==='flex'" label="垂直排列">-->
<!--            <el-radio-group v-model="props.activeData.align">-->
<!--              <el-radio-button label="top"/>-->
<!--              <el-radio-button label="middle"/>-->
<!--              <el-radio-button label="bottom"/>-->
<!--            </el-radio-group>-->
<!--          </el-form-item>-->
          <el-form-item v-if="activeData.labelWidth!==undefined" label="标签宽度">
            <el-input v-model.number="props.activeData.labelWidth" type="number" placeholder="请输入标签宽度"/>
          </el-form-item>
<!--          <el-form-item v-if="props.activeData.style&&props.activeData.style.width!==undefined" label="组件宽度">-->
<!--            <el-input v-model="props.activeData.style.width" placeholder="请输入组件宽度" clearable/>-->
<!--          </el-form-item>-->

          <el-form-item v-if="props.activeData.tag==='el-checkbox-group'" label="至少应选">
            <el-input-number
                :value="props.activeData.min"
                :min="0"
                placeholder="至少应选"
                @input="$set(activeData, 'min', $event?$event:undefined)"
            />
          </el-form-item>
          <el-form-item v-if="props.activeData.tag==='el-checkbox-group'" label="最多可选">
            <el-input-number
                :value="props.activeData.max"
                :min="0"
                placeholder="最多可选"
                @input="$set(activeData, 'max', $event?$event:undefined)"
            />
          </el-form-item>
          <el-form-item v-if="props.activeData.prepend!==undefined" label="前缀">
            <el-input v-model="props.activeData.prepend" placeholder="请输入前缀"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.append!==undefined" label="后缀">
            <el-input v-model="props.activeData.append" placeholder="请输入后缀"/>
          </el-form-item>
          <el-form-item v-if="props.activeData['prefix-icon']!==undefined" label="前图标">
            <el-input v-model="activeData['prefix-icon']" placeholder="请输入前图标名称">
              <el-button slot="append" icon="el-icon-thumb" @click="openIconsDialog('prefix-icon')">
                选择
              </el-button>
            </el-input>
          </el-form-item>
          <el-form-item v-if="props.activeData['suffix-icon'] !== undefined" label="后图标">
            <el-input v-model="props.activeData['suffix-icon']" placeholder="请输入后图标名称">
              <el-button slot="append" icon="el-icon-thumb" @click="openIconsDialog('suffix-icon')">
                选择
              </el-button>
            </el-input>
          </el-form-item>
          <el-form-item v-if="props.activeData.tag === 'el-cascader'" label="选项分隔符">
            <el-input v-model="props.activeData.separator" placeholder="请输入选项分隔符"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.autosize !== undefined" label="最小行数">
            <el-input-number v-model="props.activeData.autosize.minRows" :min="1" placeholder="最小行数"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.autosize !== undefined" label="最大行数">
            <el-input-number v-model="props.activeData.autosize.maxRows" :min="1" placeholder="最大行数"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.min !== undefined" label="最小值">
            <el-input-number v-model="props.activeData.min" placeholder="最小值"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.max !== undefined" label="最大值">
            <el-input-number v-model="props.activeData.max" placeholder="最大值"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.step !== undefined" label="步长">
            <el-input-number v-model="props.activeData.step" placeholder="步数"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.tag === 'el-input-number'" label="精度">
            <el-input-number v-model="props.activeData.precision" :min="0" placeholder="精度"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.tag === 'el-input-number'" label="按钮位置">
            <el-radio-group v-model="props.activeData['controls-position']">
              <el-radio-button label="">
                默认
              </el-radio-button>
              <el-radio-button label="right">
                右侧
              </el-radio-button>
            </el-radio-group>
          </el-form-item>
          <el-form-item v-if="props.activeData.maxlength !== undefined" label="最多输入">
            <el-input v-model="props.activeData.maxlength" placeholder="请输入字符长度">
              <template slot="append">
                个字符
              </template>
            </el-input>
          </el-form-item>
          <el-form-item v-if="props.activeData['active-text'] !== undefined" label="开启提示">
            <el-input v-model="props.activeData['active-text']" placeholder="请输入开启提示"/>
          </el-form-item>
          <el-form-item v-if="props.activeData['inactive-text'] !== undefined" label="关闭提示">
            <el-input v-model="props.activeData['inactive-text']" placeholder="请输入关闭提示"/>
          </el-form-item>
          <el-form-item v-if="props.activeData['active-value'] !== undefined" label="开启值">
            <el-input
                :value="state.setDefaultValue(activeData['active-value'])"
                placeholder="请输入开启值"
                @input="onSwitchValueInput($event, 'active-value')"
            />
          </el-form-item>
          <el-form-item v-if="props.activeData['inactive-value'] !== undefined" label="关闭值">
            <el-input
                :value="setDefaultValue(activeData['inactive-value'])"
                placeholder="请输入关闭值"
                @input="onSwitchValueInput($event, 'inactive-value')"
            />
          </el-form-item>
          <el-form-item
              v-if="props.activeData.type !== undefined && 'el-date-picker' === props.activeData.tag"
              label="时间类型"
          >
            <el-select
                v-model="props.activeData.type"
                placeholder="请选择时间类型"
                :style="{ width: '100%' }"
                @change="dateTypeChange"
            >
              <el-option
                  v-for="(item, index) in state.dateOptions"
                  :key="index"
                  :label="item.label"
                  :value="item.value"
              />
            </el-select>
          </el-form-item>
          <el-form-item v-if="props.activeData.name !== undefined" label="文件字段名">
            <el-input v-model="props.activeData.name" placeholder="请输入上传文件字段名"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.accept !== undefined" label="文件类型">
            <el-select
                v-model="props.activeData.accept"
                placeholder="请选择文件类型"
                :style="{ width: '100%' }"
                clearable
            >
              <el-option label="图片" value="image/*"/>
              <el-option label="视频" value="video/*"/>
              <el-option label="音频" value="audio/*"/>
              <el-option label="excel" value=".xls,.xlsx"/>
              <el-option label="word" value=".doc,.docx"/>
              <el-option label="pdf" value=".pdf"/>
              <el-option label="txt" value=".txt"/>
            </el-select>
          </el-form-item>
          <el-form-item v-if="props.activeData.fileSize !== undefined" label="文件大小">
            <el-input v-model.number="props.activeData.fileSize" placeholder="请输入文件大小">
              <el-select slot="append" v-model="props.activeData.sizeUnit" :style="{ width: '66px' }">
                <el-option label="KB" value="KB"/>
                <el-option label="MB" value="MB"/>
                <el-option label="GB" value="GB"/>
              </el-select>
            </el-input>
          </el-form-item>
          <el-form-item v-if="props.activeData.action !== undefined" label="上传地址">
            <el-input v-model="props.activeData.action" placeholder="请输入上传地址" clearable/>
          </el-form-item>
          <el-form-item v-if="props.activeData['list-type'] !== undefined" label="列表类型">
            <el-radio-group v-model="props.activeData['list-type']" size="small">
              <el-radio-button label="text">
                text
              </el-radio-button>
              <el-radio-button label="picture">
                picture
              </el-radio-button>
              <el-radio-button label="picture-card">
                picture-card
              </el-radio-button>
            </el-radio-group>
          </el-form-item>
          <el-form-item
              v-if="activeData.buttonText !== undefined"
              v-show="'picture-card' !== props.activeData['list-type']"
              label="按钮文字"
          >
            <el-input v-model="props.activeData.buttonText" placeholder="请输入按钮文字"/>
          </el-form-item>
          <el-form-item v-if="props.activeData['range-separator'] !== undefined" label="分隔符">
            <el-input v-model="props.activeData['range-separator']" placeholder="请输入分隔符"/>
          </el-form-item>
          <el-form-item v-if="props.activeData['picker-options'] !== undefined" label="时间段">
            <el-input
                v-model="props.activeData['picker-options'].selectableRange"
                placeholder="请输入时间段"
            />
          </el-form-item>
          <el-form-item v-if="props.activeData.format !== undefined" label="时间格式">
            <el-input
                :value="props.activeData.format"
                placeholder="请输入时间格式"
                @input="setTimeValue($event)"
            />
          </el-form-item>
          <template v-if="['el-checkbox-group', 'el-radio-group', 'el-select'].indexOf(props.activeData.tag) > -1">
            <el-divider>选项</el-divider>
            <draggable
                :list="props.activeData.options"
                :animation="340"
                group="selectItem"
                handle=".option-drag"
            >
              <div v-for="(item, index) in props.activeData.options" :key="index" class="select-item">
                <div class="select-line-icon option-drag">
                  <i class="el-icon-s-operation"/>
                </div>
                <el-input v-model="item.label" placeholder="选项名" size="small"/>
                <el-input
                    placeholder="选项值"
                    size="small"
                    :value="item.value"
                    @input="setOptionValue(item, $event)"
                />
                <div class="close-btn select-line-icon" @click="activeData.options.splice(index, 1)">
                  <i class="el-icon-remove-outline"/>
                </div>
              </div>
            </draggable>
            <div style="margin-left: 20px;">
              <el-button
                  style="padding-bottom: 0"
                  icon="el-icon-circle-plus-outline"
                  type="text"
                  @click="addSelectItem"
              >
                添加选项
              </el-button>
            </div>
            <el-divider/>
          </template>

          <template v-if="['el-cascader'].indexOf(props.activeData.tag) > -1">
            <el-divider>选项</el-divider>
            <el-form-item label="数据类型">
              <el-radio-group v-model="props.activeData.dataType" size="small">
                <el-radio-button label="dynamic">
                  动态数据
                </el-radio-button>
                <el-radio-button label="static">
                  静态数据
                </el-radio-button>
              </el-radio-group>
            </el-form-item>

            <template v-if="props.activeData.dataType === 'dynamic'">
              <el-form-item label="标签键名">
                <el-input v-model="props.activeData.labelKey" placeholder="请输入标签键名"/>
              </el-form-item>
              <el-form-item label="值键名">
                <el-input v-model="props.activeData.valueKey" placeholder="请输入值键名"/>
              </el-form-item>
              <el-form-item label="子级键名">
                <el-input v-model="props.activeData.childrenKey" placeholder="请输入子级键名"/>
              </el-form-item>
            </template>

            <el-tree
                v-if="props.activeData.dataType === 'static'"
                draggable
                :data="props.activeData.options"
                node-key="id"
                :expand-on-click-node="false"
                :render-content="renderContent"
            />
            <div v-if="props.activeData.dataType === 'static'" style="margin-left: 20px">
              <el-button
                  style="padding-bottom: 0"
                  icon="el-icon-circle-plus-outline"
                  type="text"
                  @click="addTreeItem"
              >
                添加父级
              </el-button>
            </div>
            <el-divider/>
          </template>

          <el-form-item v-if="props.activeData.optionType !== undefined" label="选项样式">
            <el-radio-group v-model="props.activeData.optionType">
              <el-radio-button label="default">
                默认
              </el-radio-button>
              <el-radio-button label="button">
                按钮
              </el-radio-button>
            </el-radio-group>
          </el-form-item>
          <el-form-item v-if="props.activeData['active-color'] !== undefined" label="开启颜色">
            <el-color-picker v-model="props.activeData['active-color']"/>
          </el-form-item>
          <el-form-item v-if="props.activeData['inactive-color'] !== undefined" label="关闭颜色">
            <el-color-picker v-model="props.activeData['inactive-color']"/>
          </el-form-item>

          <el-form-item v-if="props.activeData['allow-half'] !== undefined" label="允许半选">
            <el-switch v-model="props.activeData['allow-half']"/>
          </el-form-item>
          <el-form-item v-if="props.activeData['show-text'] !== undefined" label="辅助文字">
            <el-switch v-model="props.activeData['show-text']" @change="rateTextChange"/>
          </el-form-item>
          <el-form-item v-if="props.activeData['show-score'] !== undefined" label="显示分数">
            <el-switch v-model="props.activeData['show-score']" @change="rateScoreChange"/>
          </el-form-item>
          <el-form-item v-if="props.activeData['show-stops'] !== undefined" label="显示间断点">
            <el-switch v-model="props.activeData['show-stops']"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.range !== undefined" label="范围选择">
            <el-switch v-model="props.activeData.range" @change="rangeChange"/>
          </el-form-item>
          <el-form-item
              v-if="props.activeData.border !== undefined && activeData.optionType === 'default'"
              label="是否带边框"
          >
            <el-switch v-model="props.activeData.border"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.tag === 'el-color-picker'" label="颜色格式">
            <el-select
                v-model="props.activeData['color-format']"
                placeholder="请选择颜色格式"
                :style="{ width: '100%' }"
                @change="colorFormatChange"
            >
              <el-option
                  v-for="(item, index) in state.colorFormatOptions"
                  :key="index"
                  :label="item.label"
                  :value="item.value"
              />
            </el-select>
          </el-form-item>
          <el-form-item
              v-if="props.activeData.size !== undefined &&
              (props.activeData.optionType === 'button' ||
                props.activeData.border ||
                props.activeData.tag === 'el-color-picker')"
              label="选项尺寸"
          >
            <el-radio-group v-model="props.activeData.size">
              <el-radio-button label="medium">
                中等
              </el-radio-button>
              <el-radio-button label="small">
                较小
              </el-radio-button>
              <el-radio-button label="mini">
                迷你
              </el-radio-button>
            </el-radio-group>
          </el-form-item>
          <el-form-item v-if="props.activeData['show-word-limit'] !== undefined" label="输入统计">
            <el-switch v-model="props.activeData['show-word-limit']"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.tag === 'el-input-number'" label="严格步数">
            <el-switch v-model="props.activeData['step-strictly']"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.tag === 'el-cascader'" label="是否多选">
            <el-switch v-model="props.activeData.props.props.multiple"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.tag === 'el-cascader'" label="展示全路径">
            <el-switch v-model="props.activeData['show-all-levels']"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.tag === 'el-cascader'" label="可否筛选">
            <el-switch v-model="props.activeData.filterable"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.clearable !== undefined" label="能否清空">
            <el-switch v-model="props.activeData.clearable"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.showTip !== undefined" label="显示提示">
            <el-switch v-model="props.activeData.showTip"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.multiple !== undefined" label="多选文件">
            <el-switch v-model="props.activeData.multiple"/>
          </el-form-item>
          <el-form-item v-if="props.activeData['auto-upload'] !== undefined" label="自动上传">
            <el-switch v-model="props.activeData['auto-upload']"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.readonly !== undefined" label="是否只读">
            <el-switch v-model="props.activeData.readonly"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.disabled !== undefined" label="是否禁用">
            <el-switch v-model="props.activeData.disabled"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.tag === 'el-select'" label="是否可搜索">
            <el-switch v-model="props.activeData.filterable"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.tag === 'el-select'" label="是否多选">
            <el-switch v-model="props.activeData.multiple" @change="multipleChange"/>
          </el-form-item>
          <el-form-item v-if="props.activeData.required !== undefined" label="是否必填">
            <el-switch v-model="props.activeData.required"/>
          </el-form-item>


          <template v-if="props.activeData.layout === 'colFormItem' && props.activeData.tag !== 'el-button'">
            <el-divider>正则校验</el-divider>
            <div
                v-for="(item, index) in props.activeData.regList"
                :key="index"
                class="reg-item"
            >
              <span class="close-btn" @click="activeData.regList.splice(index, 1)">
                <i class="el-icon-close"/>
              </span>
              <el-form-item label="表达式">
                <el-input placeholder="请输入正则"/>
              </el-form-item>
              <el-form-item label="错误提示" style="margin-bottom:0">
                <el-input placeholder="请输入错误提示"/>
              </el-form-item>
            </div>
            <div style="margin-left: 20px">
              <el-button icon="el-icon-circle-plus-outline" type="text" @click="addReg">
                添加规则
              </el-button>
            </div>
          </template>
        </el-form>
        <!-- 表单属性 -->
        <el-form v-show="state.currentTab === 'form'" size="small" label-width="90px">
          <el-form-item label="表单名">
            <el-input placeholder="请输入表单名（ref）"/>
          </el-form-item>
          <el-form-item label="表单模型">
            <el-input placeholder="请输入数据模型"/>
          </el-form-item>
          <el-form-item label="校验模型">
            <el-input placeholder="请输入校验模型"/>
          </el-form-item>
          <el-form-item label="表单尺寸">
            <el-radio-group>
              <el-radio-button label="medium">
                中等
              </el-radio-button>
              <el-radio-button label="small">
                较小
              </el-radio-button>
              <el-radio-button label="mini">
                迷你
              </el-radio-button>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="标签对齐">
            <el-radio-group>
              <el-radio-button label="left">
                左对齐
              </el-radio-button>
              <el-radio-button label="right">
                右对齐
              </el-radio-button>
              <el-radio-button label="top">
                顶部对齐
              </el-radio-button>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="标签宽度">
            <el-input-number placeholder="标签宽度"/>
          </el-form-item>
          <el-form-item label="栅格间隔">
            <el-input-number :min="0" placeholder="栅格间隔"/>
          </el-form-item>
          <el-form-item label="禁用表单">
            <el-switch/>
          </el-form-item>
          <el-form-item label="表单按钮">
            <el-switch/>
          </el-form-item>
          <el-form-item label="显示未选中组件边框">
            <el-switch/>
          </el-form-item>
        </el-form>
      </el-scrollbar>
    </div>
  </div>
</template>

<script setup lang="ts">
import {defineProps, reactive, onMounted, computed} from "vue";
import {inputComponents, selectComponents} from "../util/generator/config";
// 页面加载时
onMounted(() => {

});
const tagList = computed(() => {
  let list = [
    {
      label: '输入型组件',
      options: inputComponents
    },
    {
      label: '选择型组件',
      options: selectComponents
    }
  ]
  return list;
});
const props = defineProps({
  // 搜索表单
  activeData: {
    type: Object,
    default: () => {
    },

  },
});

const state = reactive({
  currentTab: 'field',
  currentNode: null,
  dialogVisible: false,
  iconsVisible: false,
  currentIconModel: null,
  dateTypeOptions: [
    {
      label: '日(date)',
      value: 'date'
    },
    {
      label: '周(week)',
      value: 'week'
    },
    {
      label: '月(month)',
      value: 'month'
    },
    {
      label: '年(year)',
      value: 'year'
    },
    {
      label: '日期时间(datetime)',
      value: 'datetime'
    }
  ],
  dateRangeTypeOptions: [
    {
      label: '日期范围(daterange)',
      value: 'daterange'
    },
    {
      label: '月范围(monthrange)',
      value: 'monthrange'
    },
    {
      label: '日期时间范围(datetimerange)',
      value: 'datetimerange'
    }
  ],
  colorFormatOptions: [
    {
      label: 'hex',
      value: 'hex'
    },
    {
      label: 'rgb',
      value: 'rgb'
    },
    {
      label: 'rgba',
      value: 'rgba'
    },
    {
      label: 'hsv',
      value: 'hsv'
    },
    {
      label: 'hsl',
      value: 'hsl'
    }
  ],
  justifyOptions: [
    {
      label: 'start',
      value: 'start'
    },
    {
      label: 'end',
      value: 'end'
    },
    {
      label: 'center',
      value: 'center'
    },
    {
      label: 'space-around',
      value: 'space-around'
    },
    {
      label: 'space-between',
      value: 'space-between'
    }
  ],
})
</script>

<style lang="scss" scoped>
.right-board {
  width: 350px;

  right: 0;
  top: 0;
  padding-top: 3px;

  .field-box {
    position: relative;
    height: calc(100vh - 42px);
    box-sizing: border-box;
    overflow: hidden;
  }

  .el-scrollbar {
    height: 100%;
  }
}

.select-item {
  display: flex;
  border: 1px dashed #fff;
  box-sizing: border-box;

  & .close-btn {
    cursor: pointer;
    color: #f56c6c;
  }

  & .el-input + .el-input {
    margin-left: 4px;
  }
}

.select-item + .select-item {
  margin-top: 4px;
}

.select-item.sortable-chosen {
  border: 1px dashed #409eff;
}

.select-line-icon {
  line-height: 32px;
  font-size: 22px;
  padding: 0 4px;
  color: #777;
}

.option-drag {
  cursor: move;
}

.time-range {
  .el-date-editor {
    width: 227px;
  }

  ::v-deep .el-icon-time {
    display: none;
  }
}

.document-link {
  position: absolute;
  display: block;
  width: 26px;
  height: 26px;
  top: 0;
  left: 0;
  cursor: pointer;
  background: #409eff;
  z-index: 1;
  border-radius: 0 0 6px 0;
  text-align: center;
  line-height: 26px;
  color: #fff;
  font-size: 18px;
}

.node-label {
  font-size: 14px;
}

.node-icon {
  color: #bebfc3;
}
</style>
